<div id="view_cart">
<?php if(isset($_SESSION['easycart']['items'])) : ?>
<table>
	<tr class="heading green">
		<th colspan="2">Description</th><th>Qty</th><th class="nowrap">Unit Price</th><th>Total</th>
	<tr>
	<?php foreach ($_SESSION['easycart']['items'] as $item) : ?>
	<tr>
		<td>
		<a href="<?php echo BASE_URL; ?>?remove=<?php echo $item[ITEM_ID]; ?>" title="Delete Item">
		<img src="<?php echo BASE_URL; ?>images/delete_button.jpg" alt="Delete" />
		</a>
		</td>
		<td><a href="<?php echo $item['url']; ?>"><?php echo $item['desc']; ?></a></td>
		<td class="nowrap">
			<form action="<?php echo BASE_URL; ?>" method="get" enctype="multipart/form-data">
				<input type="text" class="text" name="quantity" value="<?php echo $item['quantity']; ?>" size="2" maxlength="2" />
				<input type="hidden" name="id" value="<?php echo $item[ITEM_ID]; ?>" />
				<input type="submit" value="Go" />
			</form>
		</td>
		<td class="nowrap price"><?php echo $item['unitPrice']; ?></td>
		<td class="nowrap price"><?php echo $item['totalPrice']; ?></td>
	</tr>
	<?php endforeach; ?>
	<tr class="totals">
		<th></th>
		<th></th>
		<th></th>
		<th>SubTotal: </th>
		<th class="price nowrap"><?php echo $_SESSION['easycart']['subTotalPrice']; ?></th>
	</tr>
	<tr class="totals">
		<th></th>
		<th></th>
		<th></th>
		<th>Shipping: </th>
		<th class="price nowrap"><?php echo $_SESSION['easycart']['totalShipping']; ?></th>
	</tr>
	<tr class="totals">
		<th></th>
		<th></th>
		<th></th>
		<th>Total: </th>
		<th class="price nowrap"><?php echo $_SESSION['easycart']['totalPrice']; ?></th>
	</tr>
	<tr>
		<th colspan="3" class="al-right">
			<form action="<?php echo PRODUCT_CATALOG_URL; ?>">
			<input type="submit" value="Continue Shopping" />
			</form>
		</th>
		<th colspan="2" class="al-right">
		<form action="<?php echo PAYPAL_URL; ?>" method="post">  
		<input type="hidden" name="cmd" value="_cart">  
		<input type="hidden" name="upload" value="1">  
		<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<?php $i = 0;
foreach ($_SESSION['easycart']['items'] as $item) {
	$i++;
	echo "<input type=\"hidden\" name=\"item_name_$i\" value=\"".$item['desc']."\">";  
	echo "<input type=\"hidden\" name=\"amount_$i\" value=\"".$item['unitPrice']."\">";
	echo "<input type=\"hidden\" name=\"quantity_$i\" value=\"".$item['quantity']."\">";
	echo "<input type=\"hidden\" name=\"shipping_$i\" value=\"".$item['totalShipping']."\">";
}
?>
		<input type="submit" value="Proceed to Checkout" />  
		</form>
		</th>
	</tr>
</table>
<?php else : ?>
<p>There are currently no items in your cart.</p>
<?php endif; ?>
</div>